home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 41.zip
/
BS1 part 41
/
Abacus diskdrives IO.adf
/
CH4
/
Program1.bas
< prev
next >
Wrap
BASIC Source File
|
1978-06-28
|
623b
|
37 lines
'Program 1:
more:
INPUT "(R)ead next, (I)nput, (E)nd"; action$
IF action$="r" THEN DataReader
IF action$="i" THEN DataEntry
IF action$="e" THEN END
GOTO more
DataEntry:
CLOSE #1:
count=0
OPEN "example-file" FOR APPEND AS #1
INPUT "Name";Person$
INPUT "Street";Street$
INPUT "City";City$
PRINT #1,Person$
PRINT #1,Street$
PRINT #1,City$
CLOSE #1
GOTO more
DataReader:
IF count=0 THEN OPEN "example-file" FOR INPUT AS #1:count =1
IF EOF(1)<>0 THEN PRINT "No additional data records!": GOTO more
INPUT #1,Person$
INPUT #1,Street$
INPUT #1,City$
PRINT "Name",Person$
PRINT "Street",Street$
PRINT "City",City$
GOTO more